import {Component, Input, OnInit} from '@angular/core';
import {CommonPage} from '../common-page';
import {RoleFormComponent} from './form/role.form.component';

@Component({
  templateUrl: './role.component.html'
})
export class RoleComponent extends CommonPage implements OnInit {

  @Input() projectId;
  @Input() projectCode;

  @Input() menuRootCode;


  formComponent = RoleFormComponent;
  formTitle = `更新-{name}`;
  formData;

  ngOnInit(): void {
    if (this.projectId && this.menuRootCode) {
      this.formData = {
        menuRootCode: this.menuRootCode,
        projectId: this.projectId,
        projectCode: this.projectCode
      };
    }
  }


}


